C# Datagridview Column Header Double Click

46

C# Datagridview Column Header Double Click -

// If you want the event to NOT work on Header Double Click
private void itemsList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
    if(e.RowIndex>-1)
        HereIsNotHeader();
}

// If you want the event to ONLY work on Header Double Click
private void itemsList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
    if(e.RowIndex == -1)
        HereIsHeader();
}

Comments

Submit
0 Comments